feat: API specs update for version latest#54
Conversation
Greptile SummaryAdds a Confidence Score: 5/5Safe to merge; only P2 style suggestions remain. All findings are P2 (missing No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "chore: update API specs and SDK examples" | Re-trigger Greptile |
| } | ||
| }, | ||
| "required": [ | ||
| "total", | ||
| "frameworkProviderRepositories" | ||
| "frameworkProviderRepositories", |
There was a problem hiding this comment.
Missing
enum on discriminator property
The type field in both providerRepositoryFrameworkList and providerRepositoryRuntimeList is declared as a plain string with no enum constraint. Since the discriminator.mapping relies on exactly "framework" and "runtime" as the valid values, a schema validator will accept any arbitrary string for type (e.g. "type": "foo") without error — defeating the intent of the discriminator. Adding enum makes the contract explicit and enables correct validation:
| } | |
| }, | |
| "required": [ | |
| "total", | |
| "frameworkProviderRepositories" | |
| "frameworkProviderRepositories", | |
| "type": { | |
| "type": "string", | |
| "description": "Provider repository list type.", | |
| "enum": ["framework"], | |
| "x-example": "framework" | |
| } |
The same applies to providerRepositoryRuntimeList ("enum": ["runtime"]).
| } | ||
| }, | ||
| "required": [ | ||
| "total", | ||
| "frameworkProviderRepositories" | ||
| "frameworkProviderRepositories", |
There was a problem hiding this comment.
Missing
enum on discriminator property (Swagger 2)
Same issue as in the OpenAPI 3 spec: type in both providerRepositoryFrameworkList and providerRepositoryRuntimeList accepts any string, while the x-discriminator mapping only intends "framework" and "runtime" as valid values. Adding "enum": ["framework"] / "enum": ["runtime"] would make the constraints machine-readable and consistent with the discriminator mapping.
This PR contains API specification updates for version latest.